import axiosMethods from '@/utils/request'
import { LOGIN_PREFIX } from '@/api/apiConst'

// 保存或更新监测点信息
export function airPointSaveOrUpdate(params) {
  return axiosMethods.post(LOGIN_PREFIX + '/air/point/saveOrUpdate', JSON.stringify(params), {
    transformRequest: [
      function(data) {
        return data
      }
    ],
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 分页获取监测点信息
export function airMonitorPageList(params) {
  return axiosMethods.post(LOGIN_PREFIX + '/air/monitor/pageList', params)
}

// 分页获取监测点信息
export function airPointPageList(params) {
  return axiosMethods.post(LOGIN_PREFIX + '/air/point/pageList', params)
}

// 删除监测点信息
export function airPointDelete(params) {
  return axiosMethods.get(LOGIN_PREFIX + '/air/point/delete', params)
}

// 历史监测数据
export function airMonitorHistoryMonitorDataTable(params) {
  return axiosMethods.get(LOGIN_PREFIX + '/air/monitor/historyMonitorDataTable', params)
}

// 历史监测数据表格列
export function airMonitorHistoryMonitorDataTableColumn(params) {
  return axiosMethods.get(LOGIN_PREFIX + '/air/monitor/historyMonitorDataTableColumn', params)
}

// 报警数据
export function airAlarmAlarmMonitorData(params) {
  return axiosMethods.get(LOGIN_PREFIX + '/air/alarm/alarmMonitorData', params)
}

// 分页获取监测报告信息
export function speechPageList(params) {
  return axiosMethods.post(LOGIN_PREFIX + '/speech/pageList', params)
}

// 保存或更新监测报告信息
export function speechSaveOrUpdate(params) {
  return axiosMethods.post(LOGIN_PREFIX + '/speech/saveOrUpdate', params)
  // return axiosMethods.post('/speech/saveOrUpdate', JSON.stringify(params), {
  //   transformRequest: [
  //     function(data) {
  //       return data
  //     }
  //   ],
  //   headers: {
  //     'Content-Type': 'application/json'
  //   }
  // })
}

// 删除检测报告
export function speechDelete(params) {
  return axiosMethods.get(LOGIN_PREFIX + '/speech/delete', params)
}

// 检测报告详情
export function speechFindDetail(params) {
  return axiosMethods.get(LOGIN_PREFIX + '/speech/findDetail', params)
}
